package com.example.user.userUtil;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 贾明祯
 * @ClassName FIletest
 * @Date 2020/10/23 8:44
 * @Introduce
 */
public class FIletest {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        for(int i =0;i<4;i++){
            list.add("w"+i);
        }
        List<String> list1 = new ArrayList<>();
        for(int i =0;i<5;i++){
            list1.add("w"+i);
        }
        List<String> list2 = new ArrayList<>();
        list2.addAll(list);
        list2.retainAll(list1);
        System.out.println("重复属性："+list2);
        System.out.println("list删除前："+list);
        list.removeAll(list2);
        System.out.println("list删除后："+list);
        System.out.println("list1删除前："+list1);
        list1.removeAll(list2);
        System.out.println("list1删除后："+list1);
    }
}
